FMOD Engine User Manual 2.02

4. Platform Details | Mac

macOS Specific Starter Guide

SDK Version

FMOD is compiled using the following tools.

Compatibility

FMOD supports x86_64 and arm64 back to macOS 10.13. Please note that both x86 and PPC are not accepted for submission to the Mac App Store and thus are no longer supported by FMOD.

Libraries

FMOD Core Engine library

FMOD Studio Engine library (used in conjunction with core library)

Latency

The default latency introduced by FMOD for this platform is 4 blocks of 512 samples at a sample rate of 48KHz, which equates to approximately 43ms. You are free to change this using two APIs, System::setDSPBufferSize and System::setSoftwareFormat but there are some important considerations.

All audio devices have a number of samples they prefer to operate in, on Mac this is almost always 512, which makes our default a natural fit. If you use System::setDSPBufferSize to reduce FMODs granularity (to 256 samples for instance), be aware the audio device will still operate at its native block of 512 samples. If you would like to reduce the block size of the audio device (to 256 samples), after you have set the FMOD granularity and initialized the System object use the following code:

AudioUnit audioUnit;
gSystem->getOutputHandle((void **)&audioUnit);

AudioDeviceID audioDeviceID;
UInt32 audioDeviceIDSize = sizeof(audioDeviceID);
AudioUnitGetProperty(audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &audioDeviceID, &audioDeviceIDSize);

UInt32 bufferFrameSize = 256;
AudioDeviceSetProperty(audioDeviceID, NULL, 0, FALSE, kAudioDevicePropertyBufferFrameSize, sizeof(bufferFrameSize), &bufferFrameSize);

Thread Affinity

All threads will default to FMOD_THREAD_AFFINITY_CORE_ALL, it is not currently possible to override this with Thread_SetAttributes.

Thread Priority

The relationship between FMOD platform agnostic thread priority and the platform specific values is as follows:

Performance Reference

This section is a companion for the CPU Performance white paper and serves as a quick reference of facts targeting this platform.

Format Choice

Each compression format provided in FMOD has a reason for being included, the below list will detail our recommendations for this platform. Formats listed as primary are considering the best choice, secondary formats should only be considered if the primary doesn't satisfy your requirements.

Channel Count

To give developers an idea about the costs of a particular format we provide synthetic benchmark results. These results are based on simple usage of the FMOD Studio API using recommended configuration settings.

Settings

Test Device

Results